﻿//  --------------------------------
//  Copyright (c) 2010 Michael Schuler, Sascha Burger. All rights reserved.
//  This source code is made available under the terms of the Microsoft Public License (Ms-PL)
//  http://p2pmessaging.codeplex.com/license
//  ---------------------------------
using System;
using NUnit.Framework;
using p2pMessaging.Contracts;

namespace p2pMessaging.Tests
{
	[TestFixture]
	public class ServiceLocatorTest
	{
		[Test]
		[ExpectedException(ExceptionName = "Microsoft.Practices.Unity.ResolutionFailedException")]
		public void testGetter()
		{
			IDisposable disposable = ServiceLocator.Get<IDisposable>();
		}
		
		[Test]
		[ExpectedException(ExceptionName = "Microsoft.Practices.Unity.ResolutionFailedException")]
		public void testNamedGetter()
		{
			IDisposable disposable = ServiceLocator.Get<IDisposable>(string.Empty);
		}
	}
}
